﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Oragon.Architecture.Data.SqlBuilder.Operators
{
	/// <summary>
	/// Representa uma expressão Is Null
	/// </summary>
	[Serializable]
	public class IsNullOperator : UnaryOperator
	{
		public IsNullOperator() : base(null) { }

		public override string Operator
		{
			get { return "IS NULL"; }
		}

		public IsNullOperator(ISQLStatement expression)
			: base(expression)
		{
		}

		public override string ToSQL()
		{
			return string.Format(System.Globalization.CultureInfo.InvariantCulture, "( {1} {0} )", this.Operator, this.Expression.ToSQL());
		}

	}
}
